Skip to content

Drop the CRLF conversion and cover the CRLF path with a fixture - #228

Merged
webdevred merged 4 commits into
masterfrom
drop-crlf-conversion
Aug 22, 2026
Merged

Drop the CRLF conversion and cover the CRLF path with a fixture#228
webdevred merged 4 commits into
masterfrom
drop-crlf-conversion

Conversation

@webdevred

@webdevred webdevred commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Formatting a .jbeam file already keeps whatever line endings that file came with, so converting the shipped examples at release time changes nothing a user sees. The script had also drifted from what the packaging step copies: it converted a directory that ships nowhere and left the rulesets that go into both the installer and the zip alone.

What the LF-only fixtures did cost is coverage. Nothing in the suite contained a carriage return, on a format whose real files are 97 per cent CRLF, and the parser has had a CRLF-specific bug in a block comment before. One fixture now carries CRLF deliberately, pinned as binary so no checkout normalises it away, and the spec asserts that the same file read both ways parses to the same tree and that the fixture still has its carriage returns.

.gitattributes arrives with it, which the repository has never had. dump_ast stops reading its previous output back to pick a line ending and always writes LF. CLAUDE.md still described a source directory and a dev flag that no longer exist, and both are gone.

Converting the shipped examples buys nothing measurable: the rulesets parse
identically either way, the tool already keeps the line endings a user's own
file came with, and BeamNG ships 150 LF files of 4943 itself. Meanwhile no
fixture had a carriage return in it, so the suite never exercised CRLF on a
format whose real files mostly are.
Reading the previous output back to decide the line ending was a way of
managing what git now manages through .gitattributes. The conversion itself
stays: the formatter returns whatever the source used, and two fender fixtures
have CRLF sources.
@webdevred
webdevred marked this pull request as ready for review August 22, 2026 15:34
@webdevred
webdevred merged commit 0faf3a9 into master Aug 22, 2026
17 checks passed
@webdevred
webdevred deleted the drop-crlf-conversion branch August 22, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant